package srk.java.demo.draw2d2;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tray;

public class DisplayTest2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Display display = new Display();
		System.out.println("Started new display");
		sleep(1000);
		display.beep();
		Tray systemTray = display.getSystemTray();
		System.out.println(systemTray);//if null no system tray
		System.out.println("Display End");
	}

	/**
	 * This method waits for the time specified in milli seconds
	 */
	private static void sleep(long i) {
		long time = System.currentTimeMillis();
		long elapsedTime = time + i;
		while (true) {
			if (System.currentTimeMillis() > elapsedTime)
				break;

		}
	}

}
